package indi.liangli;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import java.util.Random;

@Configuration
@ComponentScan("indi.liangli")
public class SpringConfig {

    @Bean("rpcServer")
    public  RpcServer rpcServer(){
        int random = new Random().nextInt(7000);
        return new RpcServer(random);
    }

}
